import 'css/reset.css';
import './index.scss';

import ReactDOM from 'react-dom';
import React from 'react';
// import { Router, Route, browserHistory } from 'react-router';
import { AppContainer } from 'react-hot-loader';
import RoutesConfig from './routes';

const mountNode = document.getElementById('app');


// ReactDOM.render(
//   <RoutesConfig />,
//   mountNode
// )

const render = (Component) => {
  ReactDOM.render(
    <AppContainer>
      <Component />
    </AppContainer>,
    mountNode
  );
};

render(RoutesConfig);

if (module.hot) {
  module.hot.accept('./routes', (err) => {
    ReactDOM.unmountComponentAtNode(mountNode);
    render(RoutesConfig)
  });
}





